package universityOfCalifornia.fall2007;

import javax.swing.JFrame;

import org.jgrapht.graph.DefaultDirectedGraph;

public class Number1 extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Number1() {
		super("The Berkeley Programming Contest");
		DefaultDirectedGraph<String, String> directedGraph = new DefaultDirectedGraph<String, String>(
				String.class);

		String anton = "anton";
		String matthys = "matthys";

		directedGraph.addVertex(anton);
		directedGraph.addVertex(matthys);

		directedGraph.addEdge(anton, matthys, "meerkat");

		for (String vertex : directedGraph.vertexSet()) {
			System.out.println(vertex);
		}

		for (String edge : directedGraph.edgeSet()) {
			System.out.println(
					"source vertex = " + directedGraph.getEdgeSource(edge) + " : " + 
					"target vertex = " + directedGraph.getEdgeTarget(edge) + " : " +
					"edge = " + edge);
		}

		System.out.println("Hello World");
	}
}
